home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
tdk_v120.zip
/
CHECKPAT.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-07-15
|
2KB
|
83 lines
{
▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀ ▀▀
▀▀ ▀▀ ▀▀ ▀▀ ▀▀
▀▀ ▀▀ ▀▀▀ ▀▀▀▀▀ The DoorKit!
▀▀ ▀▀ ▀▀ ▀▀ ▀▀
▀▀ ▀▀▀▀▀▀ ▀▀ ▀▀
The BBS Door Development Kit By The People - For The People!
Feel free to modify or optimize this code at will. All I ask is that if
find a better way to do things (and you will), please send me a copy of
your modifications. Thanks in advance!....Larry L. Athey....}
Unit checkpat;
{
--- Version 3.3 91-11-21 16:12 ---
CHECKPAT.PAS: Wrapper unit for path check function.
Needs Assembler file 'checkpat.asm' (assembled as 'checkpap.obj').
Public domain software by
Thomas Wagner
Ferrari electronic GmbH
Beusselstrasse 27
D-1000 Berlin 21
Germany
BIXname: twagner
}
INTERFACE
CONST
INF_NODIR = 1; { Don't interpret name as directory }
{e Error Return codes }
{d Fehlercodes }
ERR_DRIVE = - 1; { Invalid drive }
ERR_PATH = - 2; { Invalid path }
ERR_FNAME = - 3; { Malformed filename }
ERR_DRIVECHAR = - 4; { Illegal drive letter }
ERR_PATHLEN = - 5; { Path too long }
ERR_CRITICAL = - 6; { Critical error (invalid drive) }
{e Good returns (values ORed): }
{d Rückgabewerte wenn kein Fehler auftrat: }
HAS_WILD = 1; { Filename/ext has wildcard characters }
HAS_EXT = 2; { Extension specified }
HAS_FNAME = 4; { Filename specified }
HAS_PATH = 8; { Path specified }
HAS_DRIVE = $10; { Drive specified }
FILE_EXISTS = $20; { File exists, upper byte has attributes }
IS_DIR = $1000; { Directory, upper byte has attributes }
{ The file attributes returned if FILE_EXISTS or IS_DIR is set }
IS_READ_ONLY = $0100;
IS_HIDDEN = $0200;
IS_SYSTEM = $0400;
IS_ARCHIVED = $2000;
IS_DEVICE = $4000;
FUNCTION checkpath (VAR name; inflags : INTEGER; VAR drive; VAR dir;
VAR fname; VAR ext; VAR fullpath) : INTEGER;
FUNCTION exists (VAR fname) : BOOLEAN;
IMPLEMENTATION
{$L checkpap}
FUNCTION checkpath (VAR name; inflags : INTEGER; VAR drive; VAR dir;
VAR fname; VAR ext; VAR fullpath) : INTEGER; EXTERNAL;
FUNCTION exists (VAR fname) : BOOLEAN; EXTERNAL;
END.